﻿<template>
    <div>
        <h2 @click="showName" class="sn">学校名称:{{name}}</h2>
        <h2>学校地址:{{address}}</h2>
    </div>
</template>

<script>
    //引入一个混合(mixin)
    import {mixin} from '../mixin.js'
    export default{
        name:'School',
        components:{},
        data(){
            return{
                name: 'bilibili',
                address : '魔都'
            }
        },
        //怎么应用？
        //用到一个全新的配置项
        mixins:[mixin]
    }
</script>

<style>
    .sn{
        cursor: pointer;
    }
</style>